//
//  FLMDetailView.m
//  FLMSuperS
//
//  Created by xiaoyang on 16/9/11.
//  Copyright © 2016年 FaLaoMiaoNetworkTechnologyCo. All rights reserved.
//

#import "FLMDetailView.h"


@implementation FLMDetailView

-(instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    
    if (self) {
        
        [self addSubview:self.imgV];
        [self addSubview:self.titleL];
        [self addSubview:self.priceL];
        [self addSubview:self.numL];
        [self addSubview:self.maoImgV];
        [self addSubview:self.maoL];
    }
    
    return self;
}


#pragma mark-商品图片
-(UIImageView *)imgV{
    
    if (!_imgV) {
        
        _imgV =[[UIImageView  alloc]initWithFrame:CGRectMake(0, 0, self.width, self.width)];
        _imgV.image = [UIImage imageNamed:@"1"];
    }
    
    return _imgV;
}


#pragma mark-标题
-(SLable *)titleL{
    
    if (!_titleL) {
        _titleL = [[SLable alloc]initWithFrame:CGRectMake(GETSIZE(5), _imgV.bottom, self.width-GETSIZE(5), GETHEIGHT(40)) Text:@"Anytime银饰品襄人工钻石s925女士戒指女士礼物" Font:12 Color:black textAligMent:NSTextAlignmentLeft];
        _titleL.numberOfLines = 0;
    }
    
    return _titleL;
}

#pragma mark-价格
-(SLable *)priceL{
    
    if (!_priceL) {
        
        _priceL = [[SLable alloc]initWithFrame:CGRectMake(GETSIZE(5), _titleL.bottom, GETSIZE(80), GETHEIGHT(25)) Text:@"¥99" Font:12 Color:Red textAligMent:NSTextAlignmentLeft];
        
    }
    return _priceL;
}

#pragma mark-销量
-(SLable *)numL{
    
    if (!_numL) {
        
        _numL =  [[SLable alloc]initWithFrame:CGRectMake(_priceL.right - 20, _titleL.bottom, GETSIZE(80), GETHEIGHT(25)) Text:@"65463   件" Font:12 Color:gray textAligMent:NSTextAlignmentLeft];
    }
    
    return _numL;
}


#pragma mark-天猫图标
-(UIImageView *)maoImgV{
    
    if (!_maoImgV) {
        
        _maoImgV =[[UIImageView  alloc]initWithFrame:CGRectMake(self.width-GETSIZE(40), _titleL.bottom+GETSIZE(5), GETSIZE(15), GETSIZE(15))];
        _maoImgV.image = [UIImage imageNamed:@"tianmao"];
    }
    
    return _maoImgV;
}


//天猫
-(SLable *)maoL{
    
    if (!_maoL) {
        
        _maoL = [[SLable alloc]initWithFrame:CGRectMake(_maoImgV.right+GETSIZE(5),_titleL.bottom, GETSIZE(30), GETHEIGHT(25)) Text:@"天猫" Font:10 Color:gray textAligMent:NSTextAlignmentLeft];
        
    }
    return _maoL;
}



@end
    
